using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SiteECSWeb;

public partial class SearchEngine : PageBase
{
    #region ResetAdapter
    protected override void OnPreInit(EventArgs e)
    {
        HttpContext.Current.Request.Browser.
            Adapters["System.Web.UI.WebControls.GridView, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"]
            = "SiteECSWeb.GridViewAdapterReset";
        base.OnPreInit(e);
    }
    protected override void OnUnload(EventArgs e)
    {
        base.OnUnload(e);
        HttpContext.Current.Request.Browser.
           Adapters["System.Web.UI.WebControls.GridView, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"]
           = "CSSFriendly.GridViewAdapter";
    }
    #endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.SiteMapNodeProvider = SiteMapProviderNames.TopSubMXmlSiteMapProvider.ToString();
        }
    }
    protected void lnkbtnLinks_Click(object sender, EventArgs e)
    {
        LinkButton baselnkBtn = sender as LinkButton;
        if (baselnkBtn.CommandArgument == "ExOpp")
        {
            ExOppSearch.Visible = true;            
            TendersSearch.Visible = false;
            NewsSearch.Visible = false;
            FairsSearch.Visible = false;
            ExpGuideSearch.Visible = false;
            WcompanySearch.Visible = false;
            MStudySearch.Visible = false;

            ExOppSearch.pnlContent = false;
            TendersSearch.pnlContent = false;
            MStudySearch.pnlContent = false;
            NewsSearch.pnlContent = false;
            FairsSearch.pnlContent = false;
            ExpGuideSearch.pnlContent = false;
            WcompanySearch.pnlContent = false;
        }
        else if (baselnkBtn.CommandArgument == "Tender")
        {
            ExOppSearch.Visible = false;
            NewsSearch.Visible = false;
            MStudySearch.Visible = false;
            FairsSearch.Visible = false;
            ExpGuideSearch.Visible = false;
            WcompanySearch.Visible = false;
            TendersSearch.Visible = true;

            ExOppSearch.pnlContent = false;
            TendersSearch.pnlContent = false;
            MStudySearch.pnlContent = false;
            NewsSearch.pnlContent = false;
            FairsSearch.pnlContent = false;
            ExpGuideSearch.pnlContent = false;
            WcompanySearch.pnlContent = false;
        }
        else if (baselnkBtn.CommandArgument == "MStudy")
        {
            ExOppSearch.Visible = false;
            NewsSearch.Visible = false;
            TendersSearch.Visible = false;
            FairsSearch.Visible = false;
            ExpGuideSearch.Visible = false;
            WcompanySearch.Visible = false;
            MStudySearch.Visible = true;

            ExOppSearch.pnlContent = false;
            TendersSearch.pnlContent = false;
            MStudySearch.pnlContent = false;
            NewsSearch.pnlContent = false;
            FairsSearch.pnlContent = false;
            ExpGuideSearch.pnlContent = false;
            WcompanySearch.pnlContent = false;
        }
        else if (baselnkBtn.CommandArgument == "News")
        {
            ExOppSearch.Visible = false;
            TendersSearch.Visible = false;
            MStudySearch.Visible = false;
            FairsSearch.Visible = false;
            ExpGuideSearch.Visible = false;
            WcompanySearch.Visible = false;
            NewsSearch.Visible = true;


            ExOppSearch.pnlContent = false;
            TendersSearch.pnlContent = false;
            MStudySearch.pnlContent = false;
            NewsSearch.pnlContent = false;
            FairsSearch.pnlContent = false;
            ExpGuideSearch.pnlContent = false;
            WcompanySearch.pnlContent = false;
        }
        else if (baselnkBtn.CommandArgument == "Fair")
        {
            ExOppSearch.Visible = false;
            TendersSearch.Visible = false;
            MStudySearch.Visible = false;
            NewsSearch.Visible = false;
            ExpGuideSearch.Visible = false;
            WcompanySearch.Visible = false;
            FairsSearch.Visible = true;

            ExOppSearch.pnlContent = false;
            TendersSearch.pnlContent = false;
            MStudySearch.pnlContent = false;
            NewsSearch.pnlContent = false;
            FairsSearch.pnlContent = false;
            ExpGuideSearch.pnlContent = false;
            WcompanySearch.pnlContent = false;
        }
        else if (baselnkBtn.CommandArgument == "ExpGuide")
        {
            ExOppSearch.Visible = false;
            TendersSearch.Visible = false;
            MStudySearch.Visible = false;
            NewsSearch.Visible = false;
            FairsSearch.Visible = false;
            WcompanySearch.Visible = false;
            ExpGuideSearch.Visible = true;


            ExOppSearch.pnlContent = false;
            TendersSearch.pnlContent = false;
            MStudySearch.pnlContent = false;
            NewsSearch.pnlContent = false;
            FairsSearch.pnlContent = false;
            ExpGuideSearch.pnlContent = false;
            WcompanySearch.pnlContent = false;
            
        }
        else if (baselnkBtn.CommandArgument == "Wcompany")
        {
            ExOppSearch.Visible = false;
            TendersSearch.Visible = false;
            MStudySearch.Visible = false;
            NewsSearch.Visible = false;
            FairsSearch.Visible = false;
            ExpGuideSearch.Visible = false;
            WcompanySearch.Visible = true;

            ExOppSearch.pnlContent = false;
            TendersSearch.pnlContent = false;
            MStudySearch.pnlContent = false;
            NewsSearch.pnlContent = false;
            FairsSearch.pnlContent = false;
            ExpGuideSearch.pnlContent = false;
            WcompanySearch.pnlContent = false;

        }
        else if (baselnkBtn.CommandArgument == "Auhorties")
        {
            ExOppSearch.Visible = false;
            TendersSearch.Visible = false;
            MStudySearch.Visible = false;
            NewsSearch.Visible = false;
            FairsSearch.Visible = false;
            ExpGuideSearch.Visible = false;
            WcompanySearch.Visible = false;
            //AuhortiesSearch.Visible = true;

            ExOppSearch.pnlContent = false;
            TendersSearch.pnlContent = false;
            MStudySearch.pnlContent = false;
            NewsSearch.pnlContent = false;
            FairsSearch.pnlContent = false;
            ExpGuideSearch.pnlContent = false;
            WcompanySearch.pnlContent = false;
            //AuhortiesSearch.pnlContent = false;

        }
    }
}
